package com.tt.StackQueue;

public class Test {
    public static void main(String[] args) {
        // 测试双栈实现队列
        MyQueue queue = new MyQueue();
        queue.push(1);
        queue.push(2);
        // 返回队列头部元素
        System.out.println(queue.peek());
        System.out.println(queue.pop());
        System.out.println(queue.pop());
        System.out.println(queue.empty());

        // 测试双队列实现栈
        MyStack stack = new MyStack();
        stack.push(3);
        stack.push(4);
        System.out.println(stack.top());
        System.out.println(stack.pop());
        System.out.println(stack.empty());
    }
}